﻿using System;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;

namespace YJKRevitDimension.SymbolTextSetting
{
	[Transaction(TransactionMode.Manual)]
	internal class CmdSymbolTextSetting : IExternalCommand
	{
		public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
		{
			Document document = commandData.Application.ActiveUIDocument.Document;
			GridCollector gridCollector = new GridCollector(document);
			gridCollector.CollectorInit();
			IndexMarkCollector indexMarkCollector = new IndexMarkCollector(document);
			indexMarkCollector.CollectorInit();
			new SymbolTextForm(gridCollector, indexMarkCollector).ShowDialog();
			return Autodesk.Revit.UI.Result.Succeeded;
		}
	}
}
